package com.ruoyi.regulator.service.impl;

import com.ruoyi.regulator.domain.pojo.Organization;
import com.ruoyi.regulator.mapper.OrganizationMapper;
import com.ruoyi.regulator.service.OrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class OrganizationServiceImpl implements OrganizationService {
    @Autowired
    private OrganizationMapper njtOrganizationMapper;

    @Override
    public List<Organization> getNjtOrganizationList(Organization organization) {
        return njtOrganizationMapper.selectNjtOrganizationList(organization);
    }

    @Override
    public int updateNjtOrganization(Organization organization) {
        return njtOrganizationMapper.updateNjtOrganization(organization);
    }

    @Override
    public int deleteNjtOrganizationById(Integer id) {
        return njtOrganizationMapper.deleteNjtOrganizationById(id);
    }

    @Override
    public int insertNjtOrganization(Organization organization) {
        return njtOrganizationMapper.insertNjtOrganization(organization);
    }

}
